Integrand size = 11, antiderivative size = 19 \[ \int \frac {\sin (x)}{i+\tan (x)} \, dx=\frac {1}{3} i \cos ^3(x)+\frac {\sin ^3(x)}{3} \]
[Out]
Time = 0.11 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.545, Rules used = {3599, 3187, 3186, 2645, 30, 2644} \[ \int \frac {\sin (x)}{i+\tan (x)} \, dx=\frac {\sin ^3(x)}{3}+\frac {1}{3} i \cos ^3(x) \]
[In]
[Out]
Rule 30
Rule 2644
Rule 2645
Rule 3186
Rule 3187
Rule 3599
Rubi steps \begin{align*} \text {integral}& = \int \frac {\cos (x) \sin (x)}{i \cos (x)+\sin (x)} \, dx \\ & = -(i \int \cos (x) (\cos (x)+i \sin (x)) \sin (x) \, dx) \\ & = -\left (i \int \left (\cos ^2(x) \sin (x)+i \cos (x) \sin ^2(x)\right ) \, dx\right ) \\ & = -\left (i \int \cos ^2(x) \sin (x) \, dx\right )+\int \cos (x) \sin ^2(x) \, dx \\ & = i \text {Subst}\left (\int x^2 \, dx,x,\cos (x)\right )+\text {Subst}\left (\int x^2 \, dx,x,\sin (x)\right ) \\ & = \frac {1}{3} i \cos ^3(x)+\frac {\sin ^3(x)}{3} \\ \end{align*}
Time = 0.03 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.74 \[ \int \frac {\sin (x)}{i+\tan (x)} \, dx=\frac {1}{4} i \cos (x)+\frac {1}{12} i \cos (3 x)+\frac {\sin (x)}{4}-\frac {1}{12} \sin (3 x) \]
[In]
[Out]
Time = 1.17 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.95
method | result | size |
risch | \(\frac {i {\mathrm e}^{3 i x}}{12}+\frac {i {\mathrm e}^{-i x}}{4}\) | \(18\) |
parallelrisch | \(\frac {2 i}{3}+\frac {i \cos \left (3 x \right )}{12}+\frac {i \cos \left (x \right )}{4}-\frac {\sin \left (3 x \right )}{12}+\frac {\sin \left (x \right )}{4}\) | \(26\) |
default | \(\frac {1}{2 \tan \left (\frac {x}{2}\right )-2 i}+\frac {i}{\left (\tan \left (\frac {x}{2}\right )+i\right )^{2}}+\frac {2}{3 \left (\tan \left (\frac {x}{2}\right )+i\right )^{3}}-\frac {1}{2 \left (\tan \left (\frac {x}{2}\right )+i\right )}\) | \(47\) |
norman | \(\frac {\frac {i \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{3}+\frac {4 i \left (\tan ^{2}\left (x \right )\right )}{3}+\frac {2 \left (\tan ^{2}\left (x \right )\right ) \tan \left (\frac {x}{2}\right )}{3}-\frac {\left (\tan ^{2}\left (\frac {x}{2}\right )\right ) \tan \left (x \right )}{3}-\frac {4 i \tan \left (x \right ) \tan \left (\frac {x}{2}\right )}{3}+\frac {\tan \left (x \right )}{3}-\frac {2 \tan \left (\frac {x}{2}\right )}{3}+i}{\left (1+\tan ^{2}\left (\frac {x}{2}\right )\right ) \left (\tan ^{2}\left (x \right )+1\right )}\) | \(78\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.74 \[ \int \frac {\sin (x)}{i+\tan (x)} \, dx=\frac {1}{12} \, {\left (i \, e^{\left (4 i \, x\right )} + 3 i\right )} e^{\left (-i \, x\right )} \]
[In]
[Out]
Time = 0.08 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.89 \[ \int \frac {\sin (x)}{i+\tan (x)} \, dx=\frac {i e^{3 i x}}{12} + \frac {i e^{- i x}}{4} \]
[In]
[Out]
Exception generated. \[ \int \frac {\sin (x)}{i+\tan (x)} \, dx=\text {Exception raised: RuntimeError} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 33 vs. \(2 (13) = 26\).
Time = 0.31 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.74 \[ \int \frac {\sin (x)}{i+\tan (x)} \, dx=-\frac {i}{2 \, {\left (-i \, \tan \left (\frac {1}{2} \, x\right ) - 1\right )}} - \frac {3 \, \tan \left (\frac {1}{2} \, x\right )^{2} - 1}{6 \, {\left (\tan \left (\frac {1}{2} \, x\right ) + i\right )}^{3}} \]
[In]
[Out]
Time = 4.91 (sec) , antiderivative size = 39, normalized size of antiderivative = 2.05 \[ \int \frac {\sin (x)}{i+\tan (x)} \, dx=-\frac {2\,\left (3\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+\mathrm {tan}\left (\frac {x}{2}\right )\,2{}\mathrm {i}-1\right )}{3\,\left (1+\mathrm {tan}\left (\frac {x}{2}\right )\,1{}\mathrm {i}\right )\,{\left (\mathrm {tan}\left (\frac {x}{2}\right )+1{}\mathrm {i}\right )}^3} \]
[In]
[Out]